package com.Ryan.C_Service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.Ryan.A_Bean.User;
import com.Ryan.A_Bean.UserExample;
import com.Ryan.D_Dao.UserMapper;

@Service
public class UserServiceImpl implements UserServiceInte {
	@Autowired
	private UserMapper userMapper;

	@Override
	public List<User> find_userList() {
		UserExample userExample = new UserExample();
		userExample.createCriteria().andIdIsNotNull();
		return userMapper.selectByExample(userExample);
	}

	@Override
	public Integer save_user(User user) {
		user.setName("zhaoyan");
		return userMapper.insertSelective(user);
	}

	@Override
	public List<User> find_userAll() {
		UserExample userExample = new UserExample();
		userExample.createCriteria().andIdIsNotNull();
		return userMapper.selectByExample(userExample);
	}

}
